#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;

namespace test2 {
	int add(int a, int b) {
		return a + b;
	}

	bool compare(int a, int b) {
        return a > b;
	}

	int main13() {
		int(*ptr)(int, int) = add;
		decltype(add)* funcPtr = nullptr;
		auto anotherFuncPtr = add;

		funcPtr = add;

		int ptrRst = ptr(2, 3);
		int res = add(4, 5);
		int result = funcPtr(5, 6);
		int anotherResult = anotherFuncPtr(7, 8);

		cout << "PtrRst:" << ptrRst << endl;
		cout << "Res:" << res << endl;
		cout << "Result:" << result << endl;
		cout << "Another Result:" << anotherResult << endl;

		vector<int> nums = { 2, 4, 5, 1, 3 };
		sort(nums.begin(), nums.end(), compare);
		for (auto num : nums) {
            cout << num << " ";
		}
		cout << endl;
		return 0;
	}
}